/*
 * @(#)UserContentRepository.java $version 2012. 5. 30.
 *
 */

package com.mywep.myalimi.repository.content;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.mywep.myalimi.model.UserContent;

import com.nhncorp.lucy.spring.core.util.ExtendedMap;

/**
 * @author 한지웅
 */
public class UserContentRepository extends SqlMapClientDaoSupport {
	public int countByExample(ExtendedMap param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("userContent.countByExample", param);
	}

	@SuppressWarnings("unchecked")
	public List<UserContent> selectByExample(ExtendedMap param) {
		return getSqlMapClientTemplate().queryForList("userContent.selectByExample", param);
	}

	public UserContent selectByPrimaryKey(UserContent param) {
		return (UserContent)getSqlMapClientTemplate().queryForObject("userContent.selectByPrimaryKey", param);
	}

	public Integer insert(UserContent param) {
		return (Integer)getSqlMapClientTemplate().insert("userContent.insert", param);
	}

	public Integer delete(UserContent param) {
		return (Integer)getSqlMapClientTemplate().delete("userContent.deleteByPrimaryKey", param);
	}
}
